import reducers from './reducers';
import {context,IO} from './io';


//配置接口参数

context.create('init',{
    menu:{
        url:"",
        mockUrl:'../mock/init/menu.json'
    },
    securityKeyword:{
        mockUrl:'../mock/init/securityKeyword.json'
    }
});
const initModel={
    reducer:(defauleState = {
        menu:[],
        securityKeyword:[],
    },action)=>{
        switch (action) {
            case 'HOME': {
                return Object.assign({},defauleState,{
                    value:111
                });
            }
        }
        return defauleState;
    },
    action:(dispatch)=>{
        return {
            setValue:(value)=>{
                dispatch({
                    type:"HOME",
                    value
                });
            }
        };
    }
};

reducers.assemble= {initReducer:initModel.reducer};

const action=initModel.action;
export {
    action,
    IO
};